<?php

namespace App\Master\Enum;

class ArticleTagsEnum
{
    const recommend = 1;
    const hot       = 2;
    const winnow    = 3;
    const newest    = 4;

    /**
     * 获取名称
     * @param int $tags
     * @return string
     */
    public static function getEnumName(int $tags)
    {
        $data = [
            self::recommend => '推荐',
            self::hot       => '热门',
            self::winnow    => '精选',
            self::newest    => '最新'
        ];

        return $data[$tags] ?? '';
    }
}
